﻿using System;
using System.Collections.Generic;
using ProjScan.Modules;
using ProjScan.Tools;

namespace ProjScan
{
	// Token: 0x02000159 RID: 345
	public class FixerMain
	{
		// Token: 0x06000C5C RID: 3164 RVA: 0x00036094 File Offset: 0x00034294
		public static void FixAll()
		{
			bool flag = Singleton<ModulesManager>.Instance.CheckIsCanRun();
			bool flag2 = Singleton<ModulesManager>.Instance.InitFailedResultManager();
			bool flag3 = flag && flag2;
			if (flag3)
			{
				ScanLog.Instance.LogInfo(Module.Manager, "Fix All");
				FixerMain.modulesToRun = Singleton<ModulesManager>.Instance.GetFixModules();
				List<string> list = new List<string>(FixerMain.modulesToRun.Keys);
				foreach (string key in list)
				{
					FixerMain.modulesToRun[key] = true;
				}
				Singleton<ModulesManager>.Instance.Fix(FixerMain.modulesToRun);
			}
		}

		// Token: 0x06000C5D RID: 3165 RVA: 0x00036154 File Offset: 0x00034354
		public static void FixBasicAssets()
		{
			bool flag = Singleton<ModulesManager>.Instance.CheckIsCanRun();
			bool flag2 = Singleton<ModulesManager>.Instance.InitFailedResultManager();
			bool flag3 = flag && flag2;
			if (flag3)
			{
				ScanLog.Instance.LogInfo(Module.Manager, "RunBasicAssetsFix");
				FixerMain.modulesToRun = Singleton<ModulesManager>.Instance.GetFixModules();
				List<string> list = new List<string>(FixerMain.modulesToRun.Keys);
				foreach (string text in list)
				{
					bool flag4 = text == "Basic_Assets_Fix";
					if (flag4)
					{
						FixerMain.modulesToRun[text] = true;
					}
					else
					{
						FixerMain.modulesToRun[text] = false;
					}
				}
				Singleton<ModulesManager>.Instance.Fix(FixerMain.modulesToRun);
			}
		}

		// Token: 0x06000C5E RID: 3166 RVA: 0x00036238 File Offset: 0x00034438
		public static void FixGlobalSettings()
		{
			bool flag = Singleton<ModulesManager>.Instance.CheckIsCanRun();
			bool flag2 = Singleton<ModulesManager>.Instance.InitFailedResultManager();
			bool flag3 = flag && flag2;
			if (flag3)
			{
				ScanLog.Instance.LogInfo(Module.Manager, "RunGlobalSettingsFix");
				FixerMain.modulesToRun = Singleton<ModulesManager>.Instance.GetFixModules();
				List<string> list = new List<string>(FixerMain.modulesToRun.Keys);
				foreach (string text in list)
				{
					bool flag4 = text == "Global_Settings_Fix";
					if (flag4)
					{
						FixerMain.modulesToRun[text] = true;
					}
					else
					{
						FixerMain.modulesToRun[text] = false;
					}
				}
				Singleton<ModulesManager>.Instance.Fix(FixerMain.modulesToRun);
			}
		}

		// Token: 0x06000C5F RID: 3167 RVA: 0x0003631C File Offset: 0x0003451C
		public static void FixScenes()
		{
			bool flag = Singleton<ModulesManager>.Instance.CheckIsCanRun();
			bool flag2 = Singleton<ModulesManager>.Instance.InitFailedResultManager();
			bool flag3 = flag && flag2;
			if (flag3)
			{
				ScanLog.Instance.LogInfo(Module.Manager, "RunSceneFix");
				FixerMain.modulesToRun = Singleton<ModulesManager>.Instance.GetFixModules();
				List<string> list = new List<string>(FixerMain.modulesToRun.Keys);
				foreach (string text in list)
				{
					bool flag4 = text == "Scenes_Fix";
					if (flag4)
					{
						FixerMain.modulesToRun[text] = true;
					}
					else
					{
						FixerMain.modulesToRun[text] = false;
					}
				}
				Singleton<ModulesManager>.Instance.Fix(FixerMain.modulesToRun);
			}
		}

		// Token: 0x06000C60 RID: 3168 RVA: 0x00036400 File Offset: 0x00034600
		public static void FixSelectedModules()
		{
			bool flag = Singleton<ModulesManager>.Instance.CheckIsCanRun();
			bool flag2 = Singleton<ModulesManager>.Instance.InitFailedResultManager();
			bool flag3 = flag && flag2;
			if (flag3)
			{
				ScanLog.Instance.LogInfo(Module.Manager, "Fix_Selected_Modules");
				FixerMain.modulesToRun = Singleton<ModulesManager>.Instance.GetFixModules();
				Singleton<ModulesManager>.Instance.Fix(FixerMain.modulesToRun);
			}
		}

		// Token: 0x04000793 RID: 1939
		private static Dictionary<string, bool> modulesToRun;
	}
}
